package com.caocaog.market.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 信息发布
 *
 * @author chechen
 * @date 2021-11-13
 */
@Data
@TableName("mk_information_basic")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "mk_information_basic对象", description = "信息发布")
public class Information implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "ID")
    private String id;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    @ApiModelProperty(value = "更新人", hidden = true)
    private String updateBy;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    @ApiModelProperty(value = "更新时间", hidden = true)
    private Date updateTime;

    @TableField(update = "%s+1")
    @ApiModelProperty(value = "版本号", hidden = true)
    private Integer lockVersion;

    @Dict(dicCode = "mk_whether")
    @TableLogic
    @ApiModelProperty(value = "是否删除")
    private Integer delFlag;

    @ApiModelProperty(value = "信息类型父", required = true)
    private String parentType;

    @ApiModelProperty(value = "信息类型子", required = true)
    private String childrenType;

    @ApiModelProperty(value = "信息名称", required = true)
    private String name;

    @ApiModelProperty(value = "分站id", required = true)
    private String siteId;

    @Dict(dicCode = "information_status")
    @ApiModelProperty(value = "状态 1待审核 2已驳回 3已发布")
    private Integer status;

    @Dict(dicCode = "information_upShelf")
    @ApiModelProperty(value = "是否上架 0上架 1下架")
    private Integer upShelf;

    @ApiModelProperty(value = "编号")
    private String code;

    @ApiModelProperty(value = "阅读数量")
    private Integer readQty;

    @ApiModelProperty(value = "回复数量")
    private Integer replyQty;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "分站名称", hidden = true)
    private transient String siteName;
}
